﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace ElfTyping.Animations
{
    public class CastingSummonAnimation : Animation
    {
        public CastingSummonAnimation()
            : base(@"Textures\GameState\Spell_Summon", 13, 0.5f/13f)
        {
            Frames = new List<Rectangle>();
            for (int row = 0; row < 2; row++)
            {
                for (int col = 0; col < 7; col++)
                {
                    Frames.Add(new Rectangle(col * 72, 23 + row*85, 72, 72));
                }
            }

            SetAnimateOnce();
        }
    }

    public class SummoningAnimation : Animation
    {
        public SummoningAnimation()
            : base(@"Textures\GameState\Spell_Summon", 24, 1.5f / 24f)
        {
            Frames = new List<Rectangle>();

            // row 1 -- ground stuff
            for (int col = 0; col < 6; col++)
            {
                Frames.Add(new Rectangle(col * 83, 175, 83, 83));
            }

            // row 2 -- into a gobule
            Frames.Add(new Rectangle(7, 274, 62, 62));
            Frames.Add(new Rectangle(74, 274, 62, 62));
            Frames.Add(new Rectangle(140, 274, 62, 62));
            Frames.Add(new Rectangle(205, 274, 62, 62));
            Frames.Add(new Rectangle(272, 274, 62, 62));
            Frames.Add(new Rectangle(327, 274, 62, 62));
            Frames.Add(new Rectangle(381, 274, 62, 62));
            Frames.Add(new Rectangle(433, 274, 62, 62));
            
            //row 3 -- spiraling out pt1
            for (int col = 0; col < 5; col++)
            {
                Frames.Add(new Rectangle(col * 75, 357, 75, 75));
            }          

            //row 4 -- spiraling out pt2
            for (int col = 0; col < 5; col++)
            {
                Frames.Add(new Rectangle(col * 75, 446, 75, 75));
            }

            SetAnimateOnce();
        }
    }
}
